import React from "react";
import ReactDOM from "react-dom";

class Demo extends React.Component {
  handleClick() {
    console.log(456);
  }
  render() {
    return (
      <div>
        <button onClick={()=> {console.log(123)}}>anniu</button>
        <button onClick={this.handleClick}>按钮</button>
      </div>
    )
  }
}

ReactDOM.render(<Demo />,document.getElementById('root'))